<template>
  <div class="container">
    <h1>欢迎使用交通标志识别系统</h1>
    <div v-if="isLoggedIn">
      <p>您已登录！</p>
    </div>
    <div v-else>
      <p>请 <router-link to="/login">登录</router-link> 或 <router-link to="/register">注册</router-link></p>
    </div>
  </div>
</template>

<script setup>
import { computed } from 'vue'

const isLoggedIn = computed(() => {
  return !!localStorage.getItem('token')
})
</script> 